#ifndef TLM_H
#define TLM_H

#include "common_data.h"

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <netinet/tcp.h>
#include <stdio.h>
#include <assert.h>

#define CLIENT_PORT 48700
#define CLIENT_IP INADDR_ANY

#define EXT_CMD_PORT 48710

int tlm_start();

int external_start();

int udp_start(int port);

int recv_external_cmd(int sock, char* payload);

#ifdef __cplusplus
extern "C" {
#endif

void send_tlm(int sock, gcs_tlm_t* tlm);

int recv_tlm(int sock, gcs_tlm_t* tlm);

#ifdef __cplusplus
};
#endif

#endif // TLM_H

